{% extends 'IcsocUIBundle::page.html.twig' %}
{% block content %}
{% if screens is empty %}
    <div class="alert alert-block alert-danger">
        <button type="button" class="close" data-dismiss="alert">
            <i class="ace-icon fa fa-times"></i>
        </button>
        <i class="ace-icon fa fa-times"></i>
        未设置大屏监控
    </div>
{% else %}
    {% for screen in screens %}
    <div class="row" style="margin: 1px;">
        <div class="widget-box widget-color-green">
            <div class="widget-header">
                <h4>{{ screen.name }}</h4>
            </div>
            <div class="widget-body">
                <div class="widget-main">
                    {% for key,screen_child in screen.screen_info %}
                        {% if key%2 == 0 %}
                        <div class="row">
                         {% endif %}
                        <div class="col-xs-6 col-sm-6 col-lg-6 pricing-box">
                            <div class="widget-box widget-color-green">
                                <div class="widget-body">
                                    <div class="widget-main" style="height: auto;">
                                        <div class="profile-user-info profile-user-info-striped">
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> 刷新时间： </div>

                                                <div class="profile-info-value">
                                                    <span>{{ screen_child.refresh_time }}秒</span>
                                                </div>
                                            </div>
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> 呼叫中心指标： </div>

                                                <div class="profile-info-value">
                                                    {% if screen_child.callcenter_info is empty %}
                                                        无
                                                    {% else %}
                                                        {% for callcenter in screen_child.callcenter_info %}
                                                          <div class="label label-info" style="display: inline-block;">{{ callcenter }}</div>&nbsp;
                                                    {% endfor %}
                                                    {% endif %}
                                                </div>
                                            </div>
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> 技能组指标： </div>

                                                <div class="profile-info-value">
                                                    {% if screen_child.quecenter_info is empty %}
                                                        无
                                                    {% else %}
                                                        {% for quecenter in screen_child.quecenter_info %}
                                                    <div class="label label-info" style="display: inline-block;">{{ quecenter }}</div>&nbsp;
                                                        {% endfor %}
                                                    {% endif %}
                                                </div>
                                            </div>
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> 业务组指标： </div>

                                                <div class="profile-info-value">
                                                    {% if screen_child.groupcenter_info is empty %}
                                                        无
                                                    {% else %}
                                                        {% for groupcenter in screen_child.groupcenter_info %}
                                                    <div class="label label-info" style="display: inline-block;">{{ groupcenter }}</div>&nbsp;
                                                        {% endfor %}
                                                    {% endif %}
                                                </div>
                                            </div>
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> 坐席监控： </div>

                                                <div class="profile-info-value">
                                                    <span>{{ screen_child.agentcenter_info|default('不显示') }}</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div>
                                        <a href="#" data-rel="tooltip" id="{{ screen_child.id }}" name="{{ screen_child.screen_name }}" class="btn btn-block btn-primary">
                                            <i class="ace-icon fa fa-home bigger-110"></i>
                                            <span>{{ screen_child.screen_name }}</span>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                        {% if (key+1)%2 == 0  %}
                            </div>
                        {% endif %}
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
{% endfor %}
{% endif %}
{% endblock %}
{% block footer %}
    {% javascripts
    '@jqvalidate_js'
    '@common_js'
    '@gritter_js'
    filter='uglifyjs'
    %}
    <script src="{{ asset_url }}"></script>
    {% endjavascripts %}
<script type="text/javascript">
    $('[data-rel=tooltip]').on('click', function(){
        var id = $(this).attr('id');
        var name = $(this).attr('name');
        var url = "{{ path('icsoc_monitor_screen_detail') }}"+"?id="+id;
        parent.createTab(name, url);
    });
</script>
{% endblock %}


